1. /* srmsetsl.cpp by K.Tsuru */
  2. // function ID = 801 DRADIX, BRADIX
  3. /*****************************
  4. SRational class
  5. set a value by SLong or SInteger
  6. ******************************/
  7. #ifndef SN_H
  8. #include "sn.h"
  9. #endif
  10. void SRational::Set(const SLong& n, const SLong& d){
  11. if(n.Type() != d.Type()) n.SetError(n.RADIX_ERR, "SR Set", 801);
  12. if(n.Type() == n.INTEGER){ // SLong
  13. SInteger t;
  14. num = t.ConvToBin(n); den = t.ConvToBin(d);
  15. } else { // SInteger
  16. num = n; den = d;
  17. }
  18. reduceDone = false;
  19. RadixCheck(); DenCheck();
  20. reduce(false);
  21. }

srmsetsl.cpp : last modifiled at 2016/06/26 16:29:28(586 bytes)
created at 2016/06/26 15:57:35
The creation time of this html file is 2016/09/18 20:28:05 (Sun Sep 18 20:28:05 2016).